/**
 *  Copyright (C) 2006 zhangbo (freeeob@gmail.com)
 *
 *  This product is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or
 *  (at your option) any later version.
 * 
 *  This product is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
 *
 *  author:zhangbo
 *  Email:jsjava@gmail.com
 */

/**
 * Constructor
 */
function BlogRssChannel(){
	this.jsjava_class="jsorg.eob.blog.BlogRssChannel";		
	this.items=new ArrayList();
};

/**
 * Get the channel title
 */
BlogRssChannel.prototype.getTitle=function(){
	return this.title;
};

/**
 * Set the channel title
 * @param title
 */
BlogRssChannel.prototype.setTitle=function(title){
	this.title=title;
};

/**
 * Get the channel link
 */
BlogRssChannel.prototype.getLink=function(){
	return this.link;
};

/**
 * Set the channel link
 * @param link
 */
BlogRssChannel.prototype.setLink=function(link){
	this.link=link;
};

/**
 * Get the channel description
 */
BlogRssChannel.prototype.getDescription=function(){
	return this.description;
};

/**
 * Set the channel description
 * @param description
 */
BlogRssChannel.prototype.setDescription=function(description){
	this.description=description;
};

/**
 * Get the channel publish date
 */
BlogRssChannel.prototype.getPubDate=function(){
	return this.pubDate;
};

/**
 * Set the channel publish date
 * @param pubDate
 */
BlogRssChannel.prototype.setPubDate=function(pubDate){
	this.pubDate=pubDate;
};

/**
 * Get the channel generator
 */
BlogRssChannel.prototype.getGenerator=function(){
	return this.generator;
};

/**
 * Set the channel generator
 * @param generator
 */
BlogRssChannel.prototype.setGenerator=function(generator){
	this.generator=generator;
};

/**
 * Get the channel image
 */
BlogRssChannel.prototype.getImage=function(){
	return this.image;
};

/**
 * Set the channel image
 * @param image
 */
BlogRssChannel.prototype.setImage=function(image){
	this.image=image;
};

/**
 * Add item to channel
 * @param item the rss item
 */
BlogRssChannel.prototype.addItem=function(item){
	this.items.add(item);
};

/**
 * Get item by index
 * @param index
 */
BlogRssChannel.prototype.getItem=function(index){
	return this.items.get(index);
};

/**
 * Get item by item id
 * @param itemId
 */
BlogRssChannel.prototype.getItemById=function(itemId){
	var it=this.iterator();
	while(it.hasNext()){
		var item=it.next();
		if(item.getId()==itemId){
			return item;
		}
	}
};

/**
 * Return an iterator of the channel items
 */
BlogRssChannel.prototype.iterator=function(){
	return this.items.iterator();
};

/**
 * Get all channel items
 */
BlogRssChannel.prototype.getItems=function(){
	return this.items;
};